import http from 'k6/http';

export const options = {
  discardResponseBodies: true,
  scenarios: {
    web: {
	  executor: 'ramping-arrival-rate',
	  startRate: 10,
	  timeUnit: '1s', // we start at 50 iterations per second
	  stages: [
		{ target: 80, duration: '5m' }, // go from 50 to 200 iters/s in the first 30 seconds
		{ target: 320, duration: '5m' }, // hold at 200 iters/s for 3.5 minutes
		{ target: 320, duration: '2m' }, // ramp down back to 0 iters/s over the last 30 second
		{ target: 20, duration: '15s'}
	  ],
	  preAllocatedVUs: 1000, // how large the initial pool of VUs would be
	  exec: 'web', // same function as the scenario above, but with different env vars
	},
  }
};

export function web() {
  http.get('http://10.244.0.16/', { tags: { my_custom_tag: 'web' } });
}
